package com.siwei.mes.entity.sync.tc;

import com.siwei.mes.common.validator.MockGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 砼材-供货任务(SupplyTask)实体类
 *
 * @author linzi
 * @since 2024-05-22 21:08:27
 */
@Data
@Accessors(chain = true)
@Table(name = "tc_supply_task")
@ApiModel(value = "SupplyTask", description = "砼材-供货任务")
public class SupplyTask implements Serializable {
    private static final long serialVersionUID = 588457037622278448L;
    /**
     * 主键id
     */
    @Id
    @ApiModelProperty(value = "砼材-供货任务主键ID", name = "id")
    private Long id;
    /**
     * 供货任务id
     */
    @Column(name = "supply_task_id")
    @ApiModelProperty(value = "供货任务id", name = "supplyTaskId")
    private Long supplyTaskId;
    /**
     * 供货任务编号
     */
    @Column(name = "supply_task_code")
    @ApiModelProperty(value = "供货任务编号", name = "supplyTaskCode")
    private String supplyTaskCode;
    /**
     * 产品名称
     */
    @Column(name = "project_name")
    @ApiModelProperty(value = "产品名称", name = "projectName")
    @NotBlank(groups = {MockGroup.class}, message = "产品名称为空")
    private String projectName;
    /**
     * 产品规格
     */
    @Column(name = "project_specs")
    @ApiModelProperty(value = "产品规格", name = "projectSpecs")
    @NotBlank(groups = {MockGroup.class}, message = "产品规格为空")
    private String projectSpecs;
    /**
     * 产品类型 1水泥 2粉煤灰 3矿渣粉 4粗骨料 5细骨料 6外加剂  7其它
     */
    @Column(name = "project_category")
    @ApiModelProperty(value = "产品类型 1水泥 2粉煤灰 3矿渣粉 4粗骨料 5细骨料 6外加剂  7其它", name = "projectCategory")
    @NotNull(groups = {MockGroup.class}, message = "产品类型为空")
    private Integer projectCategory;


    @Column(name = "factory")
    @ApiModelProperty(value = "生产厂家")
    @NotBlank(groups = {MockGroup.class}, message = "生产厂家为空")
    private String factory;

    /**
     * 计划供货总数(吨)
     */
    @Column(name = "supply_plan_quantity")
    @ApiModelProperty(value = "计划供货总数(吨)", name = "supplyPlanQuantity")
    @NotNull(groups = {MockGroup.class}, message = "计划供货总数为空")
    private BigDecimal supplyPlanQuantity;
    /**
     * 已供货总数(吨)|运单签收总数
     */
    @Column(name = "supply_sign_quantity")
    @ApiModelProperty(value = "已供货总数(吨)|运单签收总数", name = "supplySignQuantity")
    private BigDecimal supplySignQuantity;
    /**
     * 已发货数量(吨)
     */
    @Column(name = "transport_quantity")
    @ApiModelProperty(value = "已发货数量(吨)", name = "transportQuantity")
    private BigDecimal transportQuantity;
    /**
     * 异常数量(吨)
     */
    @Column(name = "abnormal_quantity")
    @ApiModelProperty(value = "异常数量(吨)", name = "abnormalQuantity")
    private BigDecimal abnormalQuantity;
    /**
     * 供货单位
     */
    @Column(name = "supply_company_company")
    @ApiModelProperty(value = "供货单位", name = "supplyCompanyCompany")
    private String supplyCompanyCompany;

    @Column(name = "supply_company_abbreviation")
    @ApiModelProperty(value = "供货单位简称")
    private String supplyCompanyAbbreviation;

    /**
     * 物流单位
     */
    @Column(name = "logistics_company_company")
    @ApiModelProperty(value = "物流单位", name = "logisticsCompanyCompany")
    private String logisticsCompanyCompany;
    /**
     * 收货单位
     */
    @Column(name = "mixing_plant_company")
    @ApiModelProperty(value = "收货单位", name = "mixingPlantCompany")
    private String mixingPlantCompany;
    /**
     * 计划供货时间
     */
    @Column(name = "supply_plan_time")
    @ApiModelProperty(value = "计划供货时间", name = "supplyPlanTime")
    private Date supplyPlanTime;
    /**
     * 任务派发时间
     */
    @Column(name = "task_start_time")
    @ApiModelProperty(value = "任务派发时间", name = "taskStartTime")
    private Date taskStartTime;
    /**
     * 任务状态 0拒绝任务 1待确认 2待派车 3已发货 4已完成
     */
    @Column(name = "state")
    @ApiModelProperty(value = "任务状态 0拒绝任务 1待确认 2待派车 3已发货 4已完成", name = "state")
    private Integer state;

    @Column(name = "sync_type")
    @ApiModelProperty(value = "同步数据来源")
    private String syncType;

    /**
     * 签收数量(吨) 运单统计
     */
    @Transient
    @ApiModelProperty(value = "签收数量(吨) 运单统计", name = "signQuantity")
    private BigDecimal signQuantity;

    /**
     * 备案证编号
     */
    @Transient
    @ApiModelProperty(value = "备案证编号", name = "certificateNo")
    private String certificateNo;

    /**
     * 代表数量
     */
    @Transient
    @ApiModelProperty(value = "代表数量", name = "behalfNumber")
    private BigDecimal behalfNumber;

    @Transient
    @ApiModelProperty(value = "已读时间")
    private Date readTime;

}
